#version 330 core

in vec2 TexCoords;

uniform float Time;
uniform float Speed;
uniform sampler2D image;
uniform sampler2D imageNoise;
uniform vec4 color;
uniform float n;

out vec4 FragColor;

void main()
{
	vec3 imgNoiseColor = texture2D(imageNoise, vec2(TexCoords.x+Time*Speed, TexCoords.y+Time*Speed)).rgb;
	vec2 _uv = TexCoords + imgNoiseColor.gb;
	
	vec3 c = texture2D(image, _uv*n).rgb;
    
    FragColor = vec4(c, 1.0);
}
